import prisma from "@/src/db/db";
import { NextResponse } from "next/server";


export const GET = async () => {
  const res = await prisma.order.aggregate({
    _sum: { pricePaidInCents: true },
    _count: true,
  });
  return  NextResponse.json({
    amount: res._sum.pricePaidInCents,
    numberOfSales: res._count,
  })
}